home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0159 / delphi.zip / SELECT25.PAS < prev    next >
Pascal/Delphi Source File  |  1996-01-01  |  13KB  |  285 lines

  1. {********************************************}
  2. {*                                          *}
  3. {* SELECT25.PAS generated from SELECT25.VBX *}
  4. {*                                          *}
  5. {********************************************}
  6.  
  7. unit Select25;
  8.  
  9. interface
  10.  
  11. uses SysUtils, Classes, Graphics, Forms, Controls, VBXCtrl, BIVBX;
  12.  
  13. { $DEFINE InitTSelector}
  14. {^- Remove space to enable default init data -- See documentation. }
  15.  
  16. type
  17.   TSelectorChangeEvent = procedure (Sender: TObject) of object;
  18.  
  19.   { TSelector }
  20.  
  21.   TSelector = class(TVBXControl)
  22.   protected
  23.     FOnChange: TSelectorChangeEvent;
  24.     { Event handler }
  25.     procedure HandleVBXEvent(var Message: TWMVBXFireEvent); override;
  26.     procedure DefineProperties(Filer: TFiler); override;
  27.   public
  28.     constructor Create(AOwner: TComponent); override;
  29.  
  30.     property Index: TVBInteger index 0 read GetIntProp;
  31.     property FontName: TVBString index 13 read GetStringProp write
  32.       SetStringProp;
  33.     property FontBold: Boolean index 14 read GetBoolProp write SetBoolProp;
  34.     property FontItalic: Boolean index 15 read GetBoolProp write SetBoolProp;
  35.     property FontStrikethru: Boolean index 16 read GetBoolProp write
  36.       SetBoolProp;
  37.     property FontUnderline: Boolean index 17 read GetBoolProp write
  38.       SetBoolProp;
  39.     property FontSize: Single index 18 read GetSingleProp write SetSingleProp;
  40.     property AVersion: Single index 19 read GetSingleProp write SetSingleProp;
  41.     property ZLoad: TVBInteger index 20 read GetIntProp;
  42.     property Angle: Single index 39 read GetSingleProp write SetSingleProp;
  43.     property XScale: Single index 40 read GetSingleProp write SetSingleProp;
  44.     property YScale: Single index 41 read GetSingleProp write SetSingleProp;
  45.     property Radius: Single index 42 read GetSingleProp write SetSingleProp;
  46.   published
  47.     property Enabled;
  48.     property Visible;
  49.     property MousePointer: TVBEnum index 8 read GetEnumProp write SetEnumProp
  50.       default 0;
  51.     property TabOrder;
  52.     property TabStop;
  53.     property About: TVBString index 21 read GetStringProp {NoRT}write
  54.       SetStringProp stored False;
  55.     property BorderType: TVBEnum index 22 read GetEnumProp write SetEnumProp;
  56.     property BevelWidth: TVBInteger index 23 read GetIntProp write SetIntProp;
  57.     property BevelInner: TVBEnum index 24 read GetEnumProp write SetEnumProp;
  58.     property BevelOuter: TVBEnum index 25 read GetEnumProp write SetEnumProp;
  59.     property BorderWidth: TVBInteger index 26 read GetIntProp write
  60.       SetIntProp;
  61.     property OutlineTitle: TVBString index 27 read GetStringProp write
  62.       SetStringProp;
  63.     property OutlineColor: TColor index 28 read GetColorProp write
  64.       SetColorProp;
  65.     property OutlineWidth: TVBInteger index 29 read GetIntProp write
  66.       SetIntProp;
  67.     property OutlineAlign: TVBEnum index 30 read GetEnumProp write
  68.       SetEnumProp;
  69.     property FrameStyle: TVBEnum index 31 read GetEnumProp write SetEnumProp;
  70.     property FrameScaleX: Single index 32 read GetSingleProp write
  71.       SetSingleProp;
  72.     property FrameScaleY: Single index 33 read GetSingleProp write
  73.       SetSingleProp;
  74.     property FrameColor: TColor index 34 read GetColorProp write SetColorProp;
  75.     property FramePicture: TVBPic index 35 read GetPictureProp write
  76.       SetPictureProp stored False;
  77.     property BackgroundColor: TColor index 36 read GetColorProp write
  78.       SetColorProp;
  79.     property BackgroundPicture: TVBPic index 37 read GetPictureProp write
  80.       SetPictureProp stored False;
  81.     property MouseControl: Boolean index 38 read GetBoolProp write
  82.       SetBoolProp;
  83.     property AutoAlign: Boolean index 43 read GetBoolProp write SetBoolProp;
  84.     property AutoAngle: Boolean index 44 read GetBoolProp write SetBoolProp;
  85.     property AutoOffset: Boolean index 45 read GetBoolProp write SetBoolProp;
  86.     property AutoOffsetStyle: TVBEnum index 46 read GetEnumProp write
  87.       SetEnumProp;
  88.     property AutoOffsetDistance: Single index 47 read GetSingleProp write
  89.       SetSingleProp;
  90.     property AutoStartAngle: Single index 48 read GetSingleProp write
  91.       SetSingleProp;
  92.     property AutoStopAngle: Single index 49 read GetSingleProp write
  93.       SetSingleProp;
  94.     property AutoRadius: Single index 50 read GetSingleProp write
  95.       SetSingleProp;
  96.     property LineDisplay: Boolean index 51 read GetBoolProp write SetBoolProp;
  97.     property LineInnerRadius: Single index 52 read GetSingleProp write
  98.       SetSingleProp;
  99.     property LineThickness: TVBInteger index 53 read GetIntProp write
  100.       SetIntProp;
  101.     property Selections: TVBInteger index 54 read GetIntProp write SetIntProp
  102.       stored False;
  103.     property SelectionID: TVBInteger index 55 read GetIntProp write
  104.       SetIntProp stored False;
  105.     property SelectionCaption: TVBString index 56 read GetStringProp write
  106.       SetStringProp stored False;
  107.     property SelectionAlign: TVBEnum index 57 read GetEnumProp write
  108.       SetEnumProp stored False;
  109.     property SelectionOffsetX: Single index 58 read GetSingleProp write
  110.       SetSingleProp stored False;
  111.     property SelectionOffsetY: Single index 59 read GetSingleProp write
  112.       SetSingleProp stored False;
  113.     property SelectionRadius: Single index 60 read GetSingleProp write
  114.       SetSingleProp stored False;
  115.     property SelectionColor: TColor index 61 read GetColorProp write
  116.       SetColorProp stored False;
  117.     property SelectionAngle: Single index 62 read GetSingleProp write
  118.       SetSingleProp stored False;
  119.     property SelectionFontID: TVBInteger index 63 read GetIntProp write
  120.       SetIntProp stored False;
  121.     property Captions: TVBInteger index 64 read GetIntProp write SetIntProp
  122.       stored False;
  123.     property CaptionID: TVBInteger index 65 read GetIntProp write SetIntProp
  124.       stored False;
  125.     property Caption: TVBString index 66 read GetStringProp write
  126.       SetStringProp stored False;
  127.     property CaptionX: Single index 67 read GetSingleProp write SetSingleProp
  128.       stored False;
  129.     property CaptionY: Single index 68 read GetSingleProp write SetSingleProp
  130.       stored False;
  131.     property CaptionColor: TColor index 69 read GetColorProp write
  132.       SetColorProp stored False;
  133.     property CaptionFontID: TVBInteger index 70 read GetIntProp write
  134.       SetIntProp stored False;
  135.     property KnobStyle: TVBEnum index 71 read GetEnumProp write SetEnumProp;
  136.     property KnobUserDefined: TVBString index 72 read GetStringProp write
  137.       SetStringProp;
  138.     property KnobRadius: Single index 73 read GetSingleProp write
  139.       SetSingleProp;
  140.     property KnobOriginX: Single index 74 read GetSingleProp write
  141.       SetSingleProp;
  142.     property KnobOriginY: Single index 75 read GetSingleProp write
  143.       SetSingleProp;
  144.     property KnobColor: TColor index 76 read GetColorProp write SetColorProp;
  145.     property Value: TVBInteger index 77 read GetIntProp write SetIntProp;
  146.     property MarkStyle: TVBEnum index 78 read GetEnumProp write SetEnumProp
  147.       stored False;
  148.     property MarkUserDefined: TVBString index 79 read GetStringProp write
  149.       SetStringProp;
  150.     property MarkColor: TColor index 80 read GetColorProp write SetColorProp
  151.       stored False;
  152.     property MarkInnerRadius: Single index 81 read GetSingleProp write
  153.       SetSingleProp stored False;
  154.     property MarkOuterRadius: Single index 82 read GetSingleProp write
  155.       SetSingleProp stored False;
  156.     property MarkWidth: Single index 83 read GetSingleProp write
  157.       SetSingleProp stored False;
  158.     property Highlight: Boolean index 84 read GetBoolProp write SetBoolProp;
  159.     property HighlightColor: TColor index 85 read GetColorProp write
  160.       SetColorProp;
  161.     property FontID: TVBInteger index 86 read GetIntProp write SetIntProp;
  162.     property Fonts: TVBInteger index 87 read GetIntProp write SetIntProp
  163.       stored False;
  164.     property FontDialog_: TVBString index 88 read GetStringProp {NoRT}write
  165.       SetStringProp stored False;
  166.     property AutoAngleConfine: Boolean index 89 read GetBoolProp write
  167.       SetBoolProp;
  168.     property OnClick;
  169.     property OnEnter;
  170.     property OnKeyDown;
  171.     property OnKeyPress;
  172.     property OnKeyUp;
  173.     property OnExit;
  174.     property OnMouseDown;
  175.     property OnMouseMove;
  176.     property OnMouseUp;
  177.     property OnChange: TSelectorChangeEvent read FOnChange write FOnChange;
  178.   end;
  179.  
  180. procedure Register;
  181.  
  182. implementation
  183.  
  184. { Default form data for TSelector }
  185.  
  186. {$IFDEF InitTSelector}
  187.  
  188. const
  189.   TSelectorInitLen = 565;
  190.  
  191. procedure TSelectorInitData; near; assembler;
  192. asm
  193.     DB    $00,$00,$00,$02,$06,$FF,$FF,$07,$FF,$FF,$08,$00,$09,$00,$00,$0A
  194.     DB    $00,$00,$0B,$00,$0C,$08,$53,$65,$6C,$65,$63,$74,$6F,$72,$13,$00
  195.     DB    $00,$00,$00,$14,$00,$00,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00
  196.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$41,$00
  197.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  198.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  199.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  200.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  201.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$42,$00,$00,$00,$00,$00,$00,$00
  202.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  203.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  204.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  205.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  206.     DB    $00,$00,$43,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  207.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  208.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  209.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  210.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$44,$00,$00,$00
  211.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  212.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  213.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  214.     DB    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  215.     DB    $00,$00,$00,$00,$00,$00,$01,$00,$10,$00,$07,$00,$00,$00,$00,$00
  216.     DB    $BC,$02,$00,$00,$00,$00,$01,$02,$02,$22,$53,$79,$73,$74,$65,$6D
  217.     DB    $00,$65,$77,$20,$52,$6F,$6D,$61,$6E,$00,$20,$00,$11,$00,$00,$00
  218.     DB    $00,$00,$90,$01,$00,$00,$53,$79,$6D,$62,$16,$01,$17,$02,$00,$18
  219.     DB    $01,$19,$02,$1A,$02,$00,$1B,$00,$1C,$00,$00,$00,$00,$1D,$00,$00
  220.     DB    $1E,$00,$1F,$00,$20,$00,$00,$00,$00,$21,$00,$00,$00,$00,$22,$00
  221.     DB    $00,$00,$00,$24,$C0,$C0,$C0,$00,$26,$FF,$FF,$27,$00,$00,$00,$00
  222.     DB    $28,$00,$00,$00,$00,$29,$00,$00,$00,$00,$2A,$00,$00,$00,$00,$2B
  223.     DB    $FF,$FF,$2C,$FF,$FF,$2D,$FF,$FF,$2E,$01,$2F,$00,$00,$80,$3F,$30
  224.     DB    $00,$00,$52,$43,$31,$00,$00,$A5,$43,$32,$CD,$CC,$4C,$3F,$33,$FF
  225.     DB    $FF,$34,$CD,$CC,$CC,$3E,$35,$01,$00,$47,$02,$48,$00,$49,$9A,$99
  226.     DB    $19,$3F,$4A,$00,$00,$00,$00,$4B,$00,$00,$00,$00,$4C,$80,$80,$80
  227.     DB    $00,$4D,$00,$00,$4F,$00,$54,$00,$00,$55,$00,$00,$00,$00,$56,$00
  228.     DB    $00,$59,$00,$00,$FF
  229. end;
  230.  
  231. {$ENDIF}
  232.  
  233. { TSelector }
  234.  
  235. constructor TSelector.Create(AOwner: TComponent);
  236. begin
  237.   FVBXFile := StrNew('SELECT25.VBX');
  238.   FVBXClass := StrNew('SELECTOR');
  239.   SetBounds(0, 0, 80, 32);
  240.   inherited Create(AOwner);
  241.   ControlStyle := ControlStyle - [csCaptureMouse, csClickEvents];
  242.   TabStop := True;
  243.   {$IFDEF InitTSelector}
  244.   FHForm := VBXCreateFormFile(TSelectorInitLen, @TSelectorInitData);
  245.   {$ENDIF}
  246. end;
  247.  
  248. procedure TSelector.HandleVBXEvent(var Message: TWMVBXFireEvent);
  249. begin
  250.   case Message.VBXEvent^.EventIndex of
  251.     0: DispatchNotifyEvent(OnClick);
  252.     1: begin end; { VCL Handles OnGotFocus }
  253.     2: DispatchKeyEvent(OnKeyDown, Message);
  254.     3: DispatchKeyPressedEvent(OnKeyPress, Message);
  255.     4: DispatchKeyEvent(OnKeyUp, Message);
  256.     5: begin end; { VCL Handles OnLostFocus }
  257.     6: DispatchMouseEvent(OnMouseDown, Message);
  258.     7: DispatchMouseMoveEvent(OnMouseMove, Message);
  259.     8: DispatchMouseEvent(OnMouseUp, Message);
  260.     9: DispatchCustomEvent(FOnChange, Message, 9);
  261.   end;
  262. end;
  263.  
  264. procedure TSelector.DefineProperties(Filer: TFiler);
  265. begin
  266.   inherited DefineProperties(Filer);
  267.   HandleProperty('AVersion', Filer, 19);
  268.   HandleBinaryProperty('ZLoad', Filer, 20);
  269.   HandleBinaryProperty('FramePicture_Data', Filer, 35);
  270.   HandleBinaryProperty('BackgroundPicture_Data', Filer, 37);
  271.   HandleProperty('Angle', Filer, 39);
  272.   HandleProperty('XScale', Filer, 40);
  273.   HandleProperty('YScale', Filer, 41);
  274.   HandleProperty('Radius', Filer, 42);
  275. end;
  276.  
  277. { Designer registration }
  278. procedure Register;
  279. begin
  280.   RegisterComponents('VBX', [
  281.     TSelector]);
  282. end;
  283.  
  284. end.
  285.